<?php
   require 'conn.php';
   $post['name']=$_POST['name'];
   $post['email']=$_POST['email'];
   $post['comment']=$_POST['comment'];
   $sql="INSERT INTO comments (name,email,comment) VALUES ('$post[name]','$post[email]','$post[comment]')";
   if (!mysqli_query($conn,$sql))
   {
   	die('Error:').mysqli_error($conn);
   }
   echo "<script language='javascript'>window.location.href='index.php'</script>";
   mysqli_close($conn);
?>